<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - mbi.info - test/unit_test_suite_impl.hpp</title>
  <link rel="stylesheet" type="text/css" href="../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../index.html">directory</a> - <a href="index.html">test</a> - unit_test_suite_impl.hpp</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>mbi.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-01-23</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">31</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">87.1 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">27</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : //  (C) Copyright Gennadiy Rozental 2001-2008.
<span class="lineNum">       2 </span>                : //  Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       3 </span>                : //  (See accompanying file LICENSE_1_0.txt or copy at 
<span class="lineNum">       4 </span>                : //  http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       5 </span>                : 
<span class="lineNum">       6 </span>                : //  See http://www.boost.org/libs/test for the library home page.
<span class="lineNum">       7 </span>                : //
<span class="lineNum">       8 </span>                : //  File        : $RCSfile$
<span class="lineNum">       9 </span>                : //
<span class="lineNum">      10 </span>                : //  Version     : $Revision: 49312 $
<span class="lineNum">      11 </span>                : //
<span class="lineNum">      12 </span>                : //  Description : defines test_unit, test_case, test_case_results, test_suite and test_tree_visitor
<span class="lineNum">      13 </span>                : // ***************************************************************************
<span class="lineNum">      14 </span>                : 
<span class="lineNum">      15 </span>                : #ifndef BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
<span class="lineNum">      16 </span>                : #define BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
<span class="lineNum">      17 </span>                : 
<span class="lineNum">      18 </span>                : // Boost.Test
<span class="lineNum">      19 </span>                : #include &lt;boost/test/detail/config.hpp&gt;
<span class="lineNum">      20 </span>                : #include &lt;boost/test/detail/global_typedef.hpp&gt;
<span class="lineNum">      21 </span>                : #include &lt;boost/test/utils/class_properties.hpp&gt;
<span class="lineNum">      22 </span>                : #include &lt;boost/test/utils/callback.hpp&gt;
<span class="lineNum">      23 </span>                : #include &lt;boost/test/detail/fwd_decl.hpp&gt;
<span class="lineNum">      24 </span>                : #include &lt;boost/test/detail/workaround.hpp&gt;
<span class="lineNum">      25 </span>                : #include &lt;boost/test/test_observer.hpp&gt;
<span class="lineNum">      26 </span>                : 
<span class="lineNum">      27 </span>                : // Boost
<span class="lineNum">      28 </span>                : #include &lt;boost/shared_ptr.hpp&gt;
<span class="lineNum">      29 </span>                : 
<span class="lineNum">      30 </span>                : // STL
<span class="lineNum">      31 </span>                : #include &lt;string&gt;   // for std::string
<span class="lineNum">      32 </span>                : #include &lt;list&gt;     // for std::list
<span class="lineNum">      33 </span>                : #include &lt;vector&gt;   // for std::vector
<span class="lineNum">      34 </span>                : 
<span class="lineNum">      35 </span>                : #include &lt;boost/test/detail/suppress_warnings.hpp&gt;
<span class="lineNum">      36 </span>                : 
<span class="lineNum">      37 </span>                : //____________________________________________________________________________//
<span class="lineNum">      38 </span>                : 
<span class="lineNum">      39 </span>                : namespace boost {
<span class="lineNum">      40 </span>                : 
<span class="lineNum">      41 </span>                : namespace unit_test {
<span class="lineNum">      42 </span>                : 
<span class="lineNum">      43 </span>                : // ************************************************************************** //
<span class="lineNum">      44 </span>                : // **************                   test_unit                  ************** //
<span class="lineNum">      45 </span>                : // ************************************************************************** //
<span class="lineNum">      46 </span>                : 
<span class="lineNum">      47 </span>                : class BOOST_TEST_DECL test_unit {
<span class="lineNum">      48 </span>                : public:
<span class="lineNum">      49 </span>                :     enum { type = tut_any };
<span class="lineNum">      50 </span>                : 
<span class="lineNum">      51 </span>                :     // Constructor
<span class="lineNum">      52 </span>                :     test_unit( const_string tu_name, test_unit_type t );
<span class="lineNum">      53 </span>                : 
<span class="lineNum">      54 </span>                :     // dependencies management
<span class="lineNum">      55 </span>                :     void    depends_on( test_unit* tu );
<span class="lineNum">      56 </span>                :     bool    check_dependencies() const;
<span class="lineNum">      57 </span>                : 
<span class="lineNum">      58 </span>                :     // Public r/o properties
<span class="lineNum">      59 </span><span class="lineCov">             11 :     typedef BOOST_READONLY_PROPERTY(test_unit_id,(framework_impl))  id_t;</span>
<span class="lineNum">      60 </span><span class="lineCov">             11 :     typedef BOOST_READONLY_PROPERTY(test_unit_id,(test_suite))      parent_id_t;</span>
<span class="lineNum">      61 </span>                :     readonly_property&lt;test_unit_type&gt;   p_type;                 // type for this test unit
<span class="lineNum">      62 </span>                :     readonly_property&lt;const_string&gt;     p_type_name;            // &quot;case&quot;/&quot;suite&quot;
<span class="lineNum">      63 </span>                :     id_t                                p_id;                   // unique id for this test unit
<span class="lineNum">      64 </span>                :     parent_id_t                         p_parent_id;            // parent test suite id
<span class="lineNum">      65 </span>                : 
<span class="lineNum">      66 </span>                :     // Public r/w properties
<span class="lineNum">      67 </span>                :     readwrite_property&lt;std::string&gt;     p_name;                 // name for this test unit
<span class="lineNum">      68 </span>                :     readwrite_property&lt;unsigned&gt;        p_timeout;              // timeout for the test unit execution 
<span class="lineNum">      69 </span>                :     readwrite_property&lt;counter_t&gt;       p_expected_failures;    // number of expected failures in this test unit
<span class="lineNum">      70 </span>                :     mutable readwrite_property&lt;bool&gt;    p_enabled;              // enabled status for this unit
<span class="lineNum">      71 </span>                : 
<span class="lineNum">      72 </span>                :     void                                increase_exp_fail( unsigned num );
<span class="lineNum">      73 </span>                : 
<span class="lineNum">      74 </span>                : protected:
<span class="lineNum">      75 </span>                :     ~test_unit();
<span class="lineNum">      76 </span>                : 
<span class="lineNum">      77 </span>                : private:
<span class="lineNum">      78 </span>                :     // Data members
<span class="lineNum">      79 </span>                :     std::list&lt;test_unit_id&gt;             m_dependencies;
<span class="lineNum">      80 </span>                : };
<span class="lineNum">      81 </span>                : 
<span class="lineNum">      82 </span>                : // ************************************************************************** //
<span class="lineNum">      83 </span>                : // **************              test_case_generator             ************** //
<span class="lineNum">      84 </span>                : // ************************************************************************** //
<span class="lineNum">      85 </span>                : 
<span class="lineNum">      86 </span>                : class BOOST_TEST_DECL test_unit_generator {
<span class="lineNum">      87 </span>                : public:
<span class="lineNum">      88 </span>                :     virtual test_unit*  next() const = 0;
<span class="lineNum">      89 </span>                : 
<span class="lineNum">      90 </span>                : protected:
<span class="lineNum">      91 </span>                :     BOOST_TEST_PROTECTED_VIRTUAL ~test_unit_generator() {}
<span class="lineNum">      92 </span>                : };
<span class="lineNum">      93 </span>                : 
<span class="lineNum">      94 </span>                : // ************************************************************************** //
<span class="lineNum">      95 </span>                : // **************                   test_case                  ************** //
<span class="lineNum">      96 </span>                : // ************************************************************************** //
<span class="lineNum">      97 </span>                : 
<span class="lineNum">      98 </span>                : class BOOST_TEST_DECL test_case : public test_unit {
<span class="lineNum">      99 </span>                : public:
<span class="lineNum">     100 </span>                :     enum { type = tut_case };
<span class="lineNum">     101 </span>                : 
<span class="lineNum">     102 </span>                :     // Constructor
<span class="lineNum">     103 </span>                :     test_case( const_string tc_name, callback0&lt;&gt; const&amp; test_func );
<span class="lineNum">     104 </span>                : 
<span class="lineNum">     105 </span>                :     // Access methods
<span class="lineNum">     106 </span><span class="lineCov">              7 :     callback0&lt;&gt; const&amp;  test_func() const { return m_test_func; }</span>
<span class="lineNum">     107 </span>                : 
<span class="lineNum">     108 </span>                : private:
<span class="lineNum">     109 </span>                :     friend class framework_impl;
<span class="lineNum">     110 </span><span class="lineCov">              7 :     ~test_case() {}</span>
<span class="lineNum">     111 </span>                : 
<span class="lineNum">     112 </span>                :     // BOOST_MSVC &lt;= 1200 have problems with callback as property
<span class="lineNum">     113 </span>                :     // Data members
<span class="lineNum">     114 </span>                :     callback0&lt;&gt; m_test_func;
<span class="lineNum">     115 </span>                : };
<span class="lineNum">     116 </span>                : 
<span class="lineNum">     117 </span>                : // ************************************************************************** //
<span class="lineNum">     118 </span>                : // **************                  test_suite                  ************** //
<span class="lineNum">     119 </span>                : // ************************************************************************** //
<span class="lineNum">     120 </span>                : 
<span class="lineNum">     121 </span>                : class BOOST_TEST_DECL test_suite : public test_unit {
<span class="lineNum">     122 </span>                : public:
<span class="lineNum">     123 </span>                :     enum { type = tut_suite };
<span class="lineNum">     124 </span>                : 
<span class="lineNum">     125 </span>                :     // Constructor
<span class="lineNum">     126 </span>                :     explicit        test_suite( const_string ts_name );
<span class="lineNum">     127 </span>                : 
<span class="lineNum">     128 </span>                :     // test unit list management
<span class="lineNum">     129 </span>                :     void            add( test_unit* tu, counter_t expected_failures = 0, unsigned timeout = 0 );
<span class="lineNum">     130 </span>                :     void            add( test_unit_generator const&amp; gen, unsigned timeout = 0 );
<span class="lineNum">     131 </span>                :     void            remove( test_unit_id id );
<span class="lineNum">     132 </span>                : 
<span class="lineNum">     133 </span>                :     // access methods
<span class="lineNum">     134 </span>                :     test_unit_id    get( const_string tu_name ) const;
<span class="lineNum">     135 </span>                :     std::size_t     size() const { return m_members.size(); }
<span class="lineNum">     136 </span>                : 
<span class="lineNum">     137 </span>                : protected:
<span class="lineNum">     138 </span>                :     friend BOOST_TEST_DECL 
<span class="lineNum">     139 </span>                :     void        traverse_test_tree( test_suite const&amp;, test_tree_visitor&amp; );
<span class="lineNum">     140 </span>                :     friend class framework_impl;
<span class="lineNum">     141 </span><span class="lineCov">              4 :     virtual     ~test_suite() {}</span>
<span class="lineNum">     142 </span>                : 
<span class="lineNum">     143 </span>                :     // Data members
<span class="lineNum">     144 </span>                :     std::vector&lt;test_unit_id&gt; m_members;
<span class="lineNum">     145 </span>                : };
<span class="lineNum">     146 </span>                : 
<span class="lineNum">     147 </span>                : // ************************************************************************** //
<span class="lineNum">     148 </span>                : // **************               master_test_suite              ************** //
<span class="lineNum">     149 </span>                : // ************************************************************************** //
<span class="lineNum">     150 </span>                : 
<span class="lineNum">     151 </span><span class="lineCov">              2 : class BOOST_TEST_DECL master_test_suite_t : public test_suite {</span>
<span class="lineNum">     152 </span>                : public:
<span class="lineNum">     153 </span><span class="lineCov">              2 :     master_test_suite_t() : test_suite( &quot;Master Test Suite&quot; )</span>
<span class="lineNum">     154 </span>                :     , argc( 0 )
<span class="lineNum">     155 </span><span class="lineCov">              2 :     , argv( 0 )</span>
<span class="lineNum">     156 </span><span class="lineCov">              2 :     {}</span>
<span class="lineNum">     157 </span>                :     
<span class="lineNum">     158 </span>                :     // Data members    
<span class="lineNum">     159 </span>                :     int      argc;
<span class="lineNum">     160 </span>                :     char**   argv;
<span class="lineNum">     161 </span>                : };
<span class="lineNum">     162 </span>                : 
<span class="lineNum">     163 </span>                : 
<span class="lineNum">     164 </span>                : // ************************************************************************** //
<span class="lineNum">     165 </span>                : // **************               test_tree_visitor              ************** //
<span class="lineNum">     166 </span>                : // ************************************************************************** //
<span class="lineNum">     167 </span>                : 
<span class="lineNum">     168 </span><span class="lineCov">             10 : class BOOST_TEST_DECL test_tree_visitor {</span>
<span class="lineNum">     169 </span>                : public:
<span class="lineNum">     170 </span>                :     // test tree visitor interface
<span class="lineNum">     171 </span><span class="lineNoCov">              0 :     virtual void    visit( test_case const&amp; )               {}</span>
<span class="lineNum">     172 </span><span class="lineNoCov">              0 :     virtual bool    test_suite_start( test_suite const&amp; )   { return true; }</span>
<span class="lineNum">     173 </span><span class="lineCov">              8 :     virtual void    test_suite_finish( test_suite const&amp; )  {}</span>
<span class="lineNum">     174 </span>                : 
<span class="lineNum">     175 </span>                : protected:
<span class="lineNum">     176 </span><span class="lineCov">             10 :     BOOST_TEST_PROTECTED_VIRTUAL ~test_tree_visitor() {}</span>
<span class="lineNum">     177 </span>                : };
<span class="lineNum">     178 </span>                : 
<span class="lineNum">     179 </span>                : // ************************************************************************** //
<span class="lineNum">     180 </span>                : // **************               traverse_test_tree             ************** //
<span class="lineNum">     181 </span>                : // ************************************************************************** //
<span class="lineNum">     182 </span>                : 
<span class="lineNum">     183 </span>                : BOOST_TEST_DECL void    traverse_test_tree( test_case const&amp;, test_tree_visitor&amp; );
<span class="lineNum">     184 </span>                : BOOST_TEST_DECL void    traverse_test_tree( test_suite const&amp;, test_tree_visitor&amp; );
<span class="lineNum">     185 </span>                : BOOST_TEST_DECL void    traverse_test_tree( test_unit_id     , test_tree_visitor&amp; );
<span class="lineNum">     186 </span>                : 
<span class="lineNum">     187 </span>                : //____________________________________________________________________________//
<span class="lineNum">     188 </span>                : 
<span class="lineNum">     189 </span>                : inline void
<span class="lineNum">     190 </span><span class="lineCov">              4 : traverse_test_tree( test_unit const&amp; tu, test_tree_visitor&amp; V )</span>
<span class="lineNum">     191 </span>                : {
<span class="lineNum">     192 </span><span class="lineCov">              4 :     if( tu.p_type == tut_case )</span>
<span class="lineNum">     193 </span><span class="lineNoCov">              0 :         traverse_test_tree( static_cast&lt;test_case const&amp;&gt;( tu ), V );</span>
<span class="lineNum">     194 </span>                :     else
<span class="lineNum">     195 </span><span class="lineCov">              4 :         traverse_test_tree( static_cast&lt;test_suite const&amp;&gt;( tu ), V );</span>
<span class="lineNum">     196 </span><span class="lineCov">              4 : }</span>
<span class="lineNum">     197 </span>                : 
<span class="lineNum">     198 </span>                : //____________________________________________________________________________//
<span class="lineNum">     199 </span>                : 
<span class="lineNum">     200 </span>                : // ************************************************************************** //
<span class="lineNum">     201 </span>                : // **************                test_case_counter             ************** //
<span class="lineNum">     202 </span>                : // ************************************************************************** //
<span class="lineNum">     203 </span>                : 
<span class="lineNum">     204 </span><span class="lineCov">              2 : class test_case_counter : public test_tree_visitor {</span>
<span class="lineNum">     205 </span>                : public:
<span class="lineNum">     206 </span>                :     // Constructor
<span class="lineNum">     207 </span><span class="lineCov">              2 :     test_case_counter() : p_count( 0 ) {}</span>
<span class="lineNum">     208 </span>                : 
<span class="lineNum">     209 </span><span class="lineCov">              2 :     BOOST_READONLY_PROPERTY( counter_t, (test_case_counter)) p_count;</span>
<span class="lineNum">     210 </span>                : private:
<span class="lineNum">     211 </span>                :     // test tree visitor interface
<span class="lineNum">     212 </span>                :     virtual void    visit( test_case const&amp; );
<span class="lineNum">     213 </span><span class="lineCov">              4 :     virtual bool    test_suite_start( test_suite const&amp; ts )    { return ts.p_enabled; }</span>
<span class="lineNum">     214 </span>                : };
<span class="lineNum">     215 </span>                : 
<span class="lineNum">     216 </span>                : // ************************************************************************** //
<span class="lineNum">     217 </span>                : // **************               test_being_aborted             ************** //
<span class="lineNum">     218 </span>                : // ************************************************************************** //
<span class="lineNum">     219 </span>                : 
<span class="lineNum">     220 </span>                : struct BOOST_TEST_DECL test_being_aborted {};
<span class="lineNum">     221 </span>                : 
<span class="lineNum">     222 </span>                : // ************************************************************************** //
<span class="lineNum">     223 </span>                : // **************               object generators              ************** //
<span class="lineNum">     224 </span>                : // ************************************************************************** //
<span class="lineNum">     225 </span>                : 
<span class="lineNum">     226 </span>                : namespace ut_detail {
<span class="lineNum">     227 </span>                : 
<span class="lineNum">     228 </span>                : BOOST_TEST_DECL std::string normalize_test_case_name( const_string tu_name );
<span class="lineNum">     229 </span>                : 
<span class="lineNum">     230 </span>                : template&lt;typename InstanceType,typename UserTestCase&gt;
<span class="lineNum">     231 </span>                : struct user_tc_method_invoker {
<span class="lineNum">     232 </span>                :     typedef void (UserTestCase::*TestMethod )();
<span class="lineNum">     233 </span>                : 
<span class="lineNum">     234 </span>                :     user_tc_method_invoker( shared_ptr&lt;InstanceType&gt; inst, TestMethod test_method )
<span class="lineNum">     235 </span>                :     : m_inst( inst ), m_test_method( test_method ) {}
<span class="lineNum">     236 </span>                : 
<span class="lineNum">     237 </span>                :     void operator()() { ((*m_inst).*m_test_method)(); }
<span class="lineNum">     238 </span>                : 
<span class="lineNum">     239 </span>                :     shared_ptr&lt;InstanceType&gt; m_inst;
<span class="lineNum">     240 </span>                :     TestMethod               m_test_method;
<span class="lineNum">     241 </span>                : };
<span class="lineNum">     242 </span>                : 
<span class="lineNum">     243 </span>                : } // namespace ut_detail
<span class="lineNum">     244 </span>                : 
<span class="lineNum">     245 </span>                : //____________________________________________________________________________//
<span class="lineNum">     246 </span>                : 
<span class="lineNum">     247 </span>                : inline test_case*
<span class="lineNum">     248 </span><span class="lineCov">              7 : make_test_case( callback0&lt;&gt; const&amp; test_func, const_string tc_name )</span>
<span class="lineNum">     249 </span>                : {
<span class="lineNum">     250 </span><span class="lineCov">              7 :     return new test_case( ut_detail::normalize_test_case_name( tc_name ), test_func );</span>
<span class="lineNum">     251 </span>                : }
<span class="lineNum">     252 </span>                : 
<span class="lineNum">     253 </span>                : //____________________________________________________________________________//
<span class="lineNum">     254 </span>                : 
<span class="lineNum">     255 </span>                : template&lt;typename UserTestCase, typename InstanceType&gt;
<span class="lineNum">     256 </span>                : inline test_case*
<span class="lineNum">     257 </span>                : make_test_case( void (UserTestCase::*           test_method )(),
<span class="lineNum">     258 </span>                :                 const_string                    tc_name,
<span class="lineNum">     259 </span>                :                 boost::shared_ptr&lt;InstanceType&gt; user_test_case )
<span class="lineNum">     260 </span>                : {
<span class="lineNum">     261 </span>                :     return new test_case( ut_detail::normalize_test_case_name( tc_name ), 
<span class="lineNum">     262 </span>                :                           ut_detail::user_tc_method_invoker&lt;InstanceType,UserTestCase&gt;( user_test_case, test_method ) );
<span class="lineNum">     263 </span>                : }
<span class="lineNum">     264 </span>                : 
<span class="lineNum">     265 </span>                : //____________________________________________________________________________//
<span class="lineNum">     266 </span>                : 
<span class="lineNum">     267 </span>                : // ************************************************************************** //
<span class="lineNum">     268 </span>                : // **************           auto_test_unit_registrar           ************** //
<span class="lineNum">     269 </span>                : // ************************************************************************** //
<span class="lineNum">     270 </span>                : 
<span class="lineNum">     271 </span>                : namespace ut_detail {
<span class="lineNum">     272 </span>                : 
<span class="lineNum">     273 </span>                : struct BOOST_TEST_DECL auto_test_unit_registrar
<span class="lineNum">     274 </span>                : {
<span class="lineNum">     275 </span>                :     // Constructors
<span class="lineNum">     276 </span>                :                 auto_test_unit_registrar( test_case* tc, counter_t exp_fail );
<span class="lineNum">     277 </span>                :     explicit    auto_test_unit_registrar( const_string ts_name );
<span class="lineNum">     278 </span>                :     explicit    auto_test_unit_registrar( test_unit_generator const&amp; tc_gen );
<span class="lineNum">     279 </span>                :     explicit    auto_test_unit_registrar( int );
<span class="lineNum">     280 </span>                : 
<span class="lineNum">     281 </span>                : private:
<span class="lineNum">     282 </span>                :     static std::list&lt;test_suite*&gt;&amp; curr_ts_store();
<span class="lineNum">     283 </span>                : };
<span class="lineNum">     284 </span>                : 
<span class="lineNum">     285 </span>                : //____________________________________________________________________________//
<span class="lineNum">     286 </span>                : 
<span class="lineNum">     287 </span>                : template&lt;typename T&gt;
<span class="lineNum">     288 </span>                : struct auto_tc_exp_fail {
<span class="lineNum">     289 </span><span class="lineCov">              7 :     auto_tc_exp_fail() : m_value( 0 ) {}</span>
<span class="lineNum">     290 </span>                : 
<span class="lineNum">     291 </span>                :     explicit    auto_tc_exp_fail( unsigned v )
<span class="lineNum">     292 </span>                :     : m_value( v )
<span class="lineNum">     293 </span>                :     {
<span class="lineNum">     294 </span>                :         instance() = this;
<span class="lineNum">     295 </span>                :     }
<span class="lineNum">     296 </span>                : 
<span class="lineNum">     297 </span><span class="lineCov">              7 :     static auto_tc_exp_fail*&amp; instance() </span>
<span class="lineNum">     298 </span>                :     {
<span class="lineNum">     299 </span><span class="lineCov">              7 :         static auto_tc_exp_fail     inst; </span>
<span class="lineNum">     300 </span>                :         static auto_tc_exp_fail*    inst_ptr = &amp;inst; 
<span class="lineNum">     301 </span>                : 
<span class="lineNum">     302 </span><span class="lineCov">              7 :         return inst_ptr;</span>
<span class="lineNum">     303 </span>                :     }
<span class="lineNum">     304 </span>                : 
<span class="lineNum">     305 </span><span class="lineCov">              7 :     unsigned    value() const { return m_value; }</span>
<span class="lineNum">     306 </span>                : 
<span class="lineNum">     307 </span>                : private:
<span class="lineNum">     308 </span>                :     // Data members
<span class="lineNum">     309 </span>                :     unsigned    m_value;
<span class="lineNum">     310 </span>                : };
<span class="lineNum">     311 </span>                : 
<span class="lineNum">     312 </span>                : //____________________________________________________________________________//
<span class="lineNum">     313 </span>                : 
<span class="lineNum">     314 </span>                : } // namespace ut_detail
<span class="lineNum">     315 </span>                : 
<span class="lineNum">     316 </span>                : // ************************************************************************** //
<span class="lineNum">     317 </span>                : // **************                global_fixture                ************** //
<span class="lineNum">     318 </span>                : // ************************************************************************** //
<span class="lineNum">     319 </span>                : 
<span class="lineNum">     320 </span><span class="lineNoCov">              0 : class BOOST_TEST_DECL global_fixture : public test_observer { </span>
<span class="lineNum">     321 </span>                : public: 
<span class="lineNum">     322 </span>                :     // Constructor
<span class="lineNum">     323 </span>                :     global_fixture();
<span class="lineNum">     324 </span>                : }; 
<span class="lineNum">     325 </span>                : 
<span class="lineNum">     326 </span>                : //____________________________________________________________________________//
<span class="lineNum">     327 </span>                : 
<span class="lineNum">     328 </span>                : namespace ut_detail {
<span class="lineNum">     329 </span>                : 
<span class="lineNum">     330 </span>                : template&lt;typename F&gt; 
<span class="lineNum">     331 </span>                : struct global_fixture_impl : public global_fixture {
<span class="lineNum">     332 </span>                :     // Constructor
<span class="lineNum">     333 </span>                :     global_fixture_impl(): m_fixure( 0 )    {}
<span class="lineNum">     334 </span>                : 
<span class="lineNum">     335 </span>                :     // test observer interface
<span class="lineNum">     336 </span>                :     virtual void    test_start( counter_t ) { m_fixure = new F; }
<span class="lineNum">     337 </span>                :     virtual void    test_finish()           { delete m_fixure; m_fixure = 0; } 
<span class="lineNum">     338 </span>                :     virtual void    test_aborted()          { delete m_fixure; m_fixure = 0; } 
<span class="lineNum">     339 </span>                : 
<span class="lineNum">     340 </span>                : private:
<span class="lineNum">     341 </span>                :     // Data members
<span class="lineNum">     342 </span>                :     F*  m_fixure;
<span class="lineNum">     343 </span>                : }; 
<span class="lineNum">     344 </span>                : 
<span class="lineNum">     345 </span>                : } // namespace ut_detail
<span class="lineNum">     346 </span>                : 
<span class="lineNum">     347 </span>                : } // unit_test
<span class="lineNum">     348 </span>                : 
<span class="lineNum">     349 </span>                : } // namespace boost
<span class="lineNum">     350 </span>                : 
<span class="lineNum">     351 </span>                : #include &lt;boost/test/detail/enable_warnings.hpp&gt;
<span class="lineNum">     352 </span>                : 
<span class="lineNum">     353 </span>                : #endif // BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
<span class="lineNum">     354 </span>                : 
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
